<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
    request.setCharacterEncoding("UTF-8");
	String expertClassId = request.getParameter("expertClassId");
%>
<html>
<head>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<link href="../../css/style.css" rel="stylesheet" type="text/css">
	<link href="../../css/table.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript">
		function addClass(){
			var url = "expert_class.jsp";
			var width = '400px';
			var height ='170px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue){
				parent.frm_left.location.reload();
			}
		}
		
		function editClass(){
			var selectedClass = parent.frm_left.getSelectedClass();
			var url = "expert_class.jsp?expertClassId="+selectedClass[0];
			var width = '400px';
			var height ='170px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue){
				parent.frm_left.location.reload();
			}
		}
		
		function delClass(){
			var selectedClass = parent.frm_left.getSelectedClass();
			if(window.confirm("确定要删除专家分类[" + selectedClass[1] + "]?")){
				actionFrame.location.href = "expert_class_action.jsp?actionType=del&classId=" + selectedClass[0];
			}
		}

		function addExpert(){
			var selectedClass = parent.frm_left.getSelectedClass();
			var url = "expert_info.jsp?expertClassId=" + selectedClass[0];
			var width = '500px';
			var height ='450px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue){
				window.location.reload();
			}
		}

	    function showError(error){
			   alert(error);
		    }

		function showInfo(info){
		   window.returnValue = "ok";
		   window.close();
		}

		function refreshClassFrm(){
			parent.frm_left.location.reload();
		}
	</script>
</head>
<body rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0" >	
	<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="table-layout: fixed;">
	<!-- 工具按钮 -->
    <tr height="30px">
      <td width="100%" align="center" valign="top" bgcolor="#FFFFFF" >
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="td_button">
          <tr>
            <td width="55px"><a href="#" onclick="javascript:addClass();"><img src="../../img/button_xzfl.gif" width="82" height="24" border="0"></a></td>
            <td width="55px"><a href="#" onclick="javascript:editClass();"><img src="../../img/button_bj.gif" width="55" height="24" border="0"></a></td>
            <td width="55px"><a href="#" onclick="javascript:delClass();"><img src="../../img/button_sc.gif" width="55" height="24" border="0"></a></td>
            <td width="55px"><a href="#" onclick="javascript:addExpert();"><img src="../../img/button_xzzj.gif" width="82" height="24" border="0"></a></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
   </tr>
      <!-- 数据列表 -->
   <tr>
	<td align="center">
		<iframe src="expert_data.jsp?expertClassId=<%=expertClassId%>"  name="dataFrame" frameborder="0" width="100%" height="100%" scrolling="no"></iframe>
	</td>
   </tr>
</table>
</body>
<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</html>
